package com.bitao.system.domain.question.dto;

import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2025-05-28  16:36
 */
@Data
public class QuestionAddDTO {
    @NotBlank(message = "标题不能为空")
    private String title;

    @NotNull(message = "难度不能为空")
    @Min(value = 1, message = "难度最小为1")
    @Max(value = 10, message = "难度最大为3")
    private Integer difficulty;

    @NotNull(message = "时间限制不能为空")
    @Positive(message = "时间限制必须为正数")
    private Long timeLimit;

    @NotNull(message = "空间限制不能为空")
    @Positive(message = "空间限制必须为正数")
    private Long spaceLimit;

    @NotBlank(message = "内容不能为空")
    private String content;

    @NotBlank(message = "测试用例不能为空")
    private String questionCase;

    @NotBlank(message = "默认代码不能为空")
    private String defaultCode;

    @NotBlank(message = "主函数不能为空")
    private String mainFuc;
}
